package com.weibo4j.api;

import org.apache.http.client.methods.HttpUriRequest;

import com.weibo4j.api.annotation.Param;
import com.weibo4j.api.util.RequestType;
import com.weibo4j.api.util.UrlGenerateUtil;

public abstract class WeiboRequest<T> {
	private String  source;

    private String  accessToken;

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Param("access_token")
    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }
    
    public abstract RequestType requestType();

    public HttpUriRequest generateRequest() {
        return UrlGenerateUtil.generateUrl(this);
    }

    public abstract String baseUrl();
    
    protected abstract Class<T> responseType();
    
}
